package com.example.leepong.Activities;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.example.leepong.R;

/**
 * Created by Ichigo on 03/05/2014.
 */
public class PauseActivity extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // global errors handler
        //  Thread.SetDefaultUncaughtExceptionHandler(new ExceptionHandler());

        // set content
        setContentView(R.layout.pause);

        TextView pause = (TextView) findViewById(R.id.pause_resume);
        pause.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent returnIntent = new Intent();
                setResult(RESULT_OK, returnIntent);
                finish();
            }
        });

        TextView mainMenu = (TextView) findViewById(R.id.pause_mainMenu);
        mainMenu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent i = new Intent(getApplicationContext(), MainMenuActivity.class);
                i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                startActivity(i);
            }
        });
    }


    @Override
    protected void onRestart() {

        super.onRestart();
    }
}
